﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace qiniuUI
{
    public partial class login : Form
    {
        public static string login_ak = "";
        public static string login_bucket = "";
        public static string login_sk = "";
        public login()
        {
            InitializeComponent();
            //让窗口不能改变大小
            this.FormBorderStyle = FormBorderStyle.Fixed3D;
            qiniu_ak.Text = ConfigHelper.GetConnectionStringsConfig("ak");
            qiniu_sk.Text = ConfigHelper.GetConnectionStringsConfig("sk");
            qiniu_bucket.Text = ConfigHelper.GetConnectionStringsConfig("bucket");
        }

        private void login_sure_Click(object sender, EventArgs e)
        {
            if (qiniu_ak.Text != "" && qiniu_bucket.Text != "" && qiniu_sk.Text != "")
            {
                login_ak = qiniu_ak.Text;
                login_sk = qiniu_sk.Text;
                login_bucket = qiniu_bucket.Text;
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("请输入必要信息，输入完成后再按确定.");
            }
        }

        private void login_Load(object sender, EventArgs e)
        {
        }
    }
}
